package javacode.chapter04;

public class Example4_9 {
    public static void main(String[] args) {
        // 错误的
        int i, sum = -1;
        for (i = 1; i < 101; i++) {
            sum = 0;
            sum += i;
        }
        System.out.println("1+2+...+100 = " + sum);
    }
}
